BuffEffect34 = BaseBuffEffect:new();
BuffEffect34.__index = BuffEffect34;

function BuffEffect34:new()
    local object = {};
    setmetatable(object, BuffEffect34);
    return object;
end

function BuffEffect34:add(fight,buff)
    local summons = FightManager.summonAction;
    local fighters = {};
    for i=1,#summons do
        if summons[i].buffId == buff.Id then
            table.insert(fighters,summons[i].fighter);
            fightLog("[EFFECT]Fighter "..buff.source.fighterId.." Buff"..buff.modelId.." 召唤效果，召唤ID："..summons[i].fighter.fighterId);
        end
    end

    FighterManager.summonFighter(fighters,buff.Id);
    return BaseBuffEffect:add(fight,buff)
end

function BuffEffect34:remove(fight,buff,...)
    local summonfighters = FightManager.summonDic[buff.Id];
    if summonfighters ~= nil and #summonfighters > 0 then
        for i=1,#summonfighters do
            if not FighterManager.isDie(summonfighters[i]) then
                FighterManager.die(fight,summonfighters[i]);
            end
            --summonfighters[i]:SetDeadCoroutine();
        end
    end
    FightManager.summonDic[buff.Id] = nil;
    return BaseBuffEffect:remove(fight,buff)
end

function BuffEffect34:action(fight,buff,...)
    return EnumConst.IBuffEffect.SUCCESS;
end
